<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<form action="json/xfb.json" class="datagrid-edit-form" data-toggle="validate" data-data-type="jsonp">
    <div class="bjui-row col-2">
        <label class="row-label">客户</label>
        <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.customer" value="${param.customer }" data-rule="required">
        </div>
        <label class="row-label">申请单位</label>
        <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.company" value="${param.company }" data-rule="required">
        </div>
         <label class="row-label">请求数量</label>
        <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.requestnum" value="${param.requestnum }" data-rule="required">
        </div>
         <label class="row-label">备用联系人</label>
        <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.sparephone" value="${param.sparename }" data-rule="required">
        </div>
         <label class="row-label">备用联系人电话</label>
        <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.sparephone" value="${param.sparephone }" data-rule="required">
        </div>
         <label class="row-label">请求时间</label>
        <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.eDate" value="${param.eDate }" data-rule="required">
        </div>
        
          <label class="row-label">请求状态</label>
        <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.requeststate" value="${param.requeststate }" data-rule="required">
        </div>
        
      <%--  <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.flag" value="${param.addFlag}" data-rule="required"  >
        </div> --%>
      
    </div>
    <div class="bjui-pageFooter">
    <ul>
    	<li>
    		<button type="button" class="btn-close btn" data-icon="close">取消</button>
    	</li>
    	<li>
    		<button type="button" class="btn-default btn" data-icon="save" onclick="adopt_request()">通过</button>
    	</li>
    	
    </ul>
    </div>
</form>
<script>
	function adopt_request(){
		/* var code = ${param.c_code}; */  //通过后台传输code数据  即 客户标识
		var requestnum = ${param.requestnum};
		var code = ${param.requestnum};
		$.ajax({
			url:'get_json/xfb',
			type:'get',
			/* data:{code:${param.c_code},requestnum:${param.requestnum}},	//返回客户标识，请求数量， */
			data:{code:code,requestnum:requestnum},
			dataType:'json',
			success:function(data){
				 console.log(JSON.stringify(data)); 
				//判断标识符来确定是否通过该请求，
				/* 获取后台传输标识符，来判断是否成功来执行相应操作
					成功通过，关闭该dialog，失败，再看其原因
				*/
			/* 	BJUI.alert('info','该请求已通过');
				BJUI.dialog('closeCurrent'); */
				alert('success');
			}
		})
	}

</script>